package edu.stthomas.seis752.model;

// default package
// Generated Apr 11, 2013 1:36:19 AM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * MediaTag generated by hbm2java
 */
@Entity
@Table(name = "media_tag", catalog = "jibster")
public class MediaTag implements java.io.Serializable {

	private Long id;
	private User userByUserId;
	private Media media;
	private User userByTagUserId;
	private Long tagUserPoints;
	private String text;
	private Date createDate;

	public MediaTag() {
	}

	public MediaTag(User userByUserId, Media media, Date createDate) {
		this.userByUserId = userByUserId;
		this.media = media;
		this.createDate = createDate;
	}

	public MediaTag(User userByUserId, Media media, User userByTagUserId,
			Long tagUserPoints, String text, Date createDate) {
		this.userByUserId = userByUserId;
		this.media = media;
		this.userByTagUserId = userByTagUserId;
		this.tagUserPoints = tagUserPoints;
		this.text = text;
		this.createDate = createDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	public User getUserByUserId() {
		return this.userByUserId;
	}

	public void setUserByUserId(User userByUserId) {
		this.userByUserId = userByUserId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "media_id", nullable = false)
	public Media getMedia() {
		return this.media;
	}

	public void setMedia(Media media) {
		this.media = media;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tag_user_id")
	public User getUserByTagUserId() {
		return this.userByTagUserId;
	}

	public void setUserByTagUserId(User userByTagUserId) {
		this.userByTagUserId = userByTagUserId;
	}

	@Column(name = "tag_user_points")
	public Long getTagUserPoints() {
		return this.tagUserPoints;
	}

	public void setTagUserPoints(Long tagUserPoints) {
		this.tagUserPoints = tagUserPoints;
	}

	@Column(name = "text", length = 100)
	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_date", nullable = false, length = 0)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}
